﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using VodafoneLiveTile.Resources;
using Microsoft.Phone.Shell;
using VodafoneLiveTile;

namespace TimLiveTile
{
    public partial class CountersPage : PhoneApplicationPage
    {
        public CountersPage()
        {
            InitializeComponent();
            DataContext = App.ViewModel;
            Counters_List.DataContext = App.ViewModel;

        }

        private void Counters_List_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var item = Counters_List.SelectedItem as CountersViewModel;

            MainPage.currentAccount.counter = Counters_List.SelectedIndex+1;
            if (NavigationService.CanGoBack)
                NavigationService.GoBack();
        }
    }
}